package com.zhaozhe.singleton;

/**
 * 线程安全的懒汉模式
 * Created by ghjou on 2018/3/7.
 */
public class SingletonLazy {
    private static SingletonLazy instance = null;

    public synchronized static SingletonLazy getInstance(){
        if (instance == null){
            instance = new SingletonLazy();
        }
        return instance;
    }
}
